#ifndef TESTOPENGLWIDGET_H
#define TESTOPENGLWIDGET_H

#include <QOpenGLWidget>
#include <QOpenGLFunctions_4_5_Core>
#include <QDebug>

class TestOpenGLWidget : public QOpenGLWidget, QOpenGLFunctions_4_5_Core
{
    Q_OBJECT
public:
    enum Shape {
        None,
        Rect,
        Circle,
        Triangle,
    };
    explicit TestOpenGLWidget(QWidget *parent = nullptr);
    ~TestOpenGLWidget();

    void drawShape(Shape shape);
    void setWireframe(bool wireframe);

protected:
    void initializeGL();
    void resizeGL(int w, int h);
    void paintGL();

signals:

private:
    Shape m_Shape;

    unsigned int VBO, VAO, EBO;
    unsigned int shaderProgram;

    int success;
    char infoLog[512];
};

#endif // TESTOPENGLWIDGET_H
